<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>手写vue2</title>
	</head>
	<body>
		<div id="app">
			<my-btn1></my-btn1>
			<my-btn2></my-btn2>
		</div>

		<script src="/dist/vue.js"></script>
		<script>
			Vue.component("my-btn2", {
				data(){
					return{
						name:'a'
					}
				},
				template: `<h1>{{name}}</h1>`,
			});

			const vm = new Vue({
				el: "#app",
				components: {
					"my-btn1": {
						template: `<h1>hello</h1>`,
					},
				},
			});
		</script>
	</body>
</html>
